<?php
	include "database.php";
	
	function classListing() {
			// @TODO - get username from GTMob
			global $_USER;
			$username = $_USER['uid'];
			//$username = "desposito6"; // Debug
			$userID = getUserID($username);

		echo 	"<h3>View Classes</h3>
				<ul id='listview' data-role='listview' data-theme='d'>";
						// List Classes
						$result = getClasses($userID);
						while($row = mysql_fetch_array($result)) {
							echo "<li><a href='javascript:getRoster(" . $row['id'] . ")'>" . $row['name'] . "</a></li>";
						}

		echo	"</ul>";
			// Close the MySQL database connection
			mysql_close($db);
	}
?>
